<?php

session_start();
define('ROOT_PATH', dirname(__FILE__) . '/../');
define('DEAYOU_PATH', dirname(__FILE__) . '/../');
header('Content-Type:text/html;charset=gbk');
if (DIRECTORY_SEPARATOR == '\\') {
    @ini_set('include_path', ('.;' . DEAYOU_PATH));
} else {
    @ini_set('include_path', ('.:' . DEAYOU_PATH));
}
date_default_timezone_set('Asia/Shanghai');
require_once DEAYOU_PATH . 'core/common.inctt.php';

require_once DEAYOU_PATH . 'core/deayou.function.php';

require_once DEAYOU_PATH . 'core/deayou.fliter.php';

$fliter = new Fliter();

require_once DEAYOU_PATH . 'core/deayou.safe.php';

require_once DEAYOU_PATH . 'core/deayou.mysql.php';
$mysql = new Mysql($db_config);
require_once DEAYOU_PATH . 'core/deayou.magic.php';
$magic = new Magic();
require_once DEAYOU_PATH . 'core/deayou.upload.php';
$upload = new uploadClass();


if (file_exists('modules/linkages/linkages.class.php')) {
	require_once 'modules/linkages/linkages.class.php';
	$result = linkagesClass::GetList(array('limit' => 'all'));
	foreach ($result as $key => $value) {
		$_G['linkages'][$value['type_nid']][$value['value']] = $value['name'];
		$_G['linkages'][$value['id']] = $value['name'];
		if ($value['type_nid'] != '') {
			$_G['_linkages'][$value['type_nid']][$value['id']] = array('name' => $value['name'], 'id' => $value['id'], 'value' => $value['value']);
		}
	}
}


// var_dump($_G['linkages']);